package 实例化;
public class Main {
    public static void main(String[] args) {
        // 实例化电脑
        Computer computer1 = new Computer("Intel i7", 16, 512);
        Computer computer2 = new Computer("AMD Ryzen 7", 8, 256);
        Computer computer3 = new Computer("Intel i5", 32, 1000);
        Computer computer4 = new Computer("AMD Ryzen 5", 16, 512);

        // 实例化学生
        Student student1 = new Student("John",computer1);
        Student student2 = new Student("Linda",computer2);
        Student student3 = new Student("Cecilia",computer3);
        Student student4 = new Student("David",computer4);

        // 输出每个学生的电脑配置
        Student[] students = {student1, student2, student3, student4};
        for (Student student : students) {
            System.out.println(student.getName() + "'s Computer Config: " + student.getComputerConfig());
        }
    }
}